import Service from './$axios'
import { appName } from '../config';

// 待发放物料列表
export const waitingForSendList = (data) => {
    return Service({
        url: `${appName}/partManage/waitingForSendList`,
        method: 'post',
        data
    })
}
// 待发放物料列表详情
export const sendListDetail = (data) => {
    return Service({
        url: `${appName}/partManage/sendListDetail`,
        method: 'post',
        data
    })
}
// 3.21
export const idListDetail = (data) => {
    return Service({
        url: `${appName}/partManage/idListDetail?${data}`,
        method: 'get',
    })
}
// 车间列表
export const workShopList = () => {
    return Service({
        url: `${appName}/partManage/workShopList`,
        method: 'get',
    })
}

// 3.3 动态查询按钮
export const dynamicQueryButton = () => {
    return Service({
        url: `${appName}/partManage/dynamicQueryButton`,
        method: 'get',
    })
}

// 3.4 领料单确认
export const confirmAcceptCode = (data) => {
    // return Service({
    //     url: `${appName}/partManage/confirmAcceptCode?${data}`,
    //     method: 'get',
    // })
    return Service({
        url: `${appName}/partManage/confirmAcceptCode`,
        method: 'post',
        data
    })
}
// 3.5 领料单发放确认
export const grantAcceptCode = (data) => {
    return Service({
        url: `${appName}/partManage/grantAcceptCode?${data}`,
        method: 'get',
    })
}
// 3.51 待发放物料 - 发放确认（子级）-- 0818
export const grantAcceptCodeDetail = (data) => {
    // return Service({
    //     url: `${appName}/partManage/grantAcceptCodeDetail?${data}`,
    //     method: 'get',
    // })
    return Service({
        url: `${appName}/partManage/grantAcceptCodeDetail`,
        method: 'post',
        data
    })
}
// 3.6领料单发布确认
export const publishAcceptCode = (data) => {
    return Service({
        url: `${appName}/partManage/publishAcceptCode`,
        method: 'post',
        data: data
    })
}
// 3.7物料发放结果
export const publishMaterialResult = (data) => {
    return Service({
        url: `${appName}/partManage/publishMaterialResult?${data}`,
        method: 'get',
    })
}
// 3.8全部提欠料
export const materialShortageList = (data) => {
    return Service({
        url: `${appName}/partManage/materialShortageList?${data}`,
        method: 'get',
    })
}
// 3.9提交欠料
export const materialShortageSubmit = (data) => {
    return Service({
        url: `${appName}/partManage/materialShortageSubmit`,
        method: 'post',
        data
    })
}
// 3.10领料单详情
export const acceptDetails = (data) => {
    return Service({
        url: `${appName}/partManage/acceptDetails?${data}`,
        method: 'get'
    })
}
// 3.11领料单最大号
export const maxAcceptCode = (data) => {
    return Service({
        url: `${appName}/partManage/maxAcceptCode?${data}`,
        method: 'get'
    })
}

// 3.22 导出未发放物料   /partManage/exportExcel   
export const exportExcel = (data) => {
    return Service({
        url: `${appName}/partManage/exportExcel`,
        method: 'post',
        data,
        responseType: 'blob'
    })
}

// 3.23 勾选导出待发放物料   /partManage/checkExpotExcel
export const checkExpotExcel = (data) => {
    return Service({
        url: `${appName}/partManage/checkExpotExcel`,
        method: 'post',
        data,
        responseType: 'blob'
    })
}

// 3.52 领料单补打印   /partManage/reprint
export const reprint = (data) => {
    return Service({
        url: `${appName}/partManage/reprint`,
        method: 'get',
        data,
        params: data
    })
}
